<template>
  <div class="list">
    <!-- <div class="pager-title">{{$route.meta.title}}</div> -->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="未上传" name="invoice">
        <invoice-list ref="invoice"></invoice-list>
      </el-tab-pane>
      <el-tab-pane label="已上传" name="uploaded">
        <uploaded-list ref="uploaded"></uploaded-list>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import InvoiceList from './components/invoiceList'
import UploadedList from './components/uploadedList'
export default {
  name: 'list',
  components: {
    InvoiceList,
    UploadedList
  },
  data() {
    return {
      activeName: 'invoice'
    }
  },
  methods: {
    handleClick() {
      this.$nextTick(() => {
        this.$refs[this.activeName].fetchData()
      })
    }
  }
}
</script>
<style lang="less" scoped>
.total {
  font-size: 14px;
  margin-bottom: 10px;
  .danger-text {
    font-size: 18px;
  }
}
</style>